//
//  ProfileQuestionsCell.swift
//  AmountBody
//
//  Created by Qiu Jishuai on 2018/1/25.
//  Copyright © 2018年 RCMTM. All rights reserved.
//

import UIKit

class ProfileQuestionsCell: UITableViewCell {

    @IBOutlet weak var questionsListView: HorizontalTextsListsView!
    @IBOutlet weak var switchView: SwitchView!

    @IBOutlet weak var searchView: SearchItemsView!
    
    @IBOutlet weak var leftLineView: LeftLineView!

    var reloadQuestionAction: ((_ index: Int) -> Void)?

    override func awakeFromNib() {
        super.awakeFromNib()

        searchView.rightButton.setImage(#imageLiteral(resourceName: "profile_btn_question").withRenderingMode(.alwaysOriginal), for: .normal)
        leftLineView.titleLabel.text = "问题中心"
        switchView.titles = ["西服工艺", "订单录入", "衬衣成衣", "RCMTM面料", "客供面料"]
        switchView.indexChangedAction = { [weak self] (index) in
            guard let me = self else { return }
            me.reloadQuestionAction?(index)
        }
    }
}
